/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.app.controller;


import io.renren.common.utils.MyUtils;
import io.renren.common.utils.R;

import io.renren.modules.app.entity.UserEntity;
import io.renren.modules.app.entity.dto.AppRegisterDTO;
import io.renren.modules.app.service.UserService;
import io.renren.modules.ums.service.UmsMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 注册
 *
 * @author Mark sunlightcs@gmail.com
 */
@RestController
@RequestMapping("app")
@Api(tags  = "APP注册接口")
public class AppRegisterController {
    @Autowired
    private UserService user;

    @PostMapping("register")
    @ApiOperation("注册")
    public R register(@RequestParam Map<Object,Object> map) {
        AppRegisterDTO appRegisterDTO = new AppRegisterDTO();
        MyUtils.copyMapToObject(map, appRegisterDTO);
        user.saveUser(appRegisterDTO);
        return R.ok("注册成功");
    }
}
